﻿// owner 蒋家伟

#pragma once
#include "Correspond_home.h"

namespace jsdk
{
    class IDataDecodec;
    class CORRESPOND_EXPORT IDataDecodecManager
    {
    public:
        virtual ~IDataDecodecManager() {}

        static const IDataDecodecManager* get();

        /// \ 获取解码器
        /// \ in agreementHead 协议头
        virtual OwnerPtr<IDataDecodec> getDataDecodec(const std::string& agreementHead) const = 0;
    };
}

#define GET_DACODEC(AGREEMENT_HEAD) \
IDataDecodecManager::get()->getDataDecodec(AGREEMENT_HEAD);